//  Copyright (C) 2012 Alexander Alimov
//
//	This file is part of Lodestar library.
//
//		Lodestar library is free software: you can redistribute it and/or modify
//		it under the terms of the GNU Lesser General Public License as published by
//		the Free Software Foundation, either version 3 of the License, or
//		(at your option) any later version.
//
//		Lodestar library is distributed in the hope that it will be useful,
//		but WITHOUT ANY WARRANTY; without even the implied warranty of
//		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//		GNU Lesser General Public License for more details.
//
//		You should have received a copy of the GNU Lesser General Public License
//		along with Lodestar library.  If not, see <http://www.gnu.org/licenses/>.
#ifndef LODESTAR_GEOMETRY_H
#define LODESTAR_GEOMETRY_H

#include "config.h"

namespace lodestar
{
    struct LODESTAR_API Vector3
    {
        Vector3() : x(0.0f), y(0.0f), z(0.0f) {}
        Vector3(float _x, float _y) : x(_x), y(_y), z(0.0f) {}
        Vector3(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {}
        float x;
        float y;
        float z;

        Vector3 normalize();
        Vector3 truncate(float length);
        float length() const;

        Vector3 operator - (const Vector3& other);

        Vector3 operator * (const float scalar);

        const Vector3& operator *= (const float scalar);

        const Vector3& operator += (const Vector3& other);
    };

    typedef Vector3 Vector;
}
#endif